package cn.wolfcode.shop.cloud.feign;

import cn.wolfcode.shop.cloud.common.Result;
import cn.wolfcode.shop.cloud.domain.Good;
import cn.wolfcode.shop.cloud.feign.hystrix.GoodsFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Set;

/**
 * Created by wolfcode-lanxw
 */
@FeignClient(name = "goods-server", fallback = GoodsFeignHystrix.class)
public interface GoodsFeignApi {

    /**
     * 根据商品id列表查询商品信息
     * @param idList
     * @return
     */
    @RequestMapping("/findByIdList")
    Result<List<Good>> findByIdList(@RequestParam("idList") Set<Long> idList);
}
